package com.ljcalc.business.components;

import java.util.LinkedList;

import junit.framework.TestCase;

public class ResultHistoriesTest extends TestCase {

	public void setUp() throws Exception{
		
	}
	
	public void tearDown() throws Exception{
		
	}

	public void testSetResult(){
		
		LinkedList list = new LinkedList<Combination>();
		Combination comb1 = new Combination(new long[]{1,2,3,4,5,6,7});
		Combination comb2 = new Combination(new long[]{10,20,30,40,50,60,70});
		list.add(comb1);
		list.add(comb2);
		
		SSLResultHistories.getInstance("dummy.result.histories").setResults(16,2011,29, list);
		SSLResultHistories.getInstance().save(false);
		
		assertEquals(list.toString(), SSLResultHistories.getInstance().getResults(SSLResultHistories.getInstance().generateKey(16,2011,29)).toString());
	}
}
